import request from '@/utils/request'

// 获取权限组
export function getPermissionList(params) {
  return request({
    url: '/permissions',
    params
  })
}
// 权限组列表

export function permissionList(params) {
  return request({
    url: '/permissions',
    params
  })
}
// 新增权限
export function addPermission(data) {
  return request({
    url: '/permissions',
    method: 'POST',
    data
  })
}

// 删除新增

export function delPermission(id) {
  return request({
    url: `/permissions/${id}`,
    method: 'delete'
  })
}

// 详情权限数据
export function detailPermission(id) {
  return request({
    url: `/permissions/${id}`
  })
}

// 修改权限数据
export function editPermission(data) {
  return request({
    url: `/permissions/${data.id}`,
    method: 'PUT',
    data
  })
}
